#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void insertsort(int* str,int n)
{
	
	for (size_t i=0; i<n-1; i++)
	{
		int end = i;
		int tmp = str[end + 1];
		while (end >= 0)
		{
			if (str[end] > tmp)
			{
				str[end + 1] = str[end];
			}
			else
			{
				break;
			}
			end--;
		}

		str[end+1] = tmp;
	}
	
}
int main()
 {
	int a[10] = { 0,9,3,4,6,7,10,23,4,5 };
 	insertsort(a,10);

	for (int i = 0; i < 10; i++)
	{
		printf("%d ", a[i]);
	}
}